﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AiFrame.InterfaceLib.MVVM
{
    /// <summary>
    /// Specifies the allocable data function.
    /// </summary>
    /// <typeparam name="T">The type of the data source.</typeparam>
    /// <returns>The data objects.</returns>
    public delegate IList<T> GetAllocableDataFunction<T>();

    /// <summary>
    /// Specifies a view which accepts an allocable
    /// data provider.
    /// </summary>
    public interface IAllocableDataProvider<T>
    {
        /// <summary>
        /// Sets the allocable data function.
        /// </summary>
        /// <param name="allocableDataFunction">The data function which retrieves data objects from the database.</param>
        void SetAllocableDataFunction(GetAllocableDataFunction<T> allocableDataFunction);
    }
}
